function [ weight ] = evalfunc( A, color)%, endgame)
%UNTITLED2 Summary of this function goes here
%   Detailed explanation goes here

	% at the end of a game it is possible to calculate every move,
	% so the sum of your stones is your evaluation
%	if(endgame == true)
%		weight = sum(A(:));
%		return;
%	end
	
	
	% Weight of board squares
	persistent W;
               W = [50,  -5,   2,   1,   1,   2,  -5,  50;
                    -5, -10,  -1,  -1,  -1,  -1, -10,  -5;
                     2,  -1,   1,   1,   1,   1,  -1,   2;
                     1,  -1,   1,  10,  10,   1,  -1,   1;
                     1,  -1,   1,  10,  10,   1,  -1,   1;
                     2,  -1,   1,   1,   1,   1,  -1,   2;
                    -5, -10,  -1,  -1,  -1,  -1, -10,  -5; 
                    50,  -5,   2,   1,   1,   2,  -5,  50]; 
%         W=[[120 -40 20 5 5 20 -40 120];[-40 -60 -5 -5 -5 -5 -60 -40];[20 -5 15 3 3 15 -5 20];[5 -5 3 3 3 3 -5 5];[5 -5 3 3 3 3 -5 5];[20 -5 15 3 3 15 -5 20];[-40 -60 -5 -5 -5 -5 -60 -40];[120 -40 20 5 5 20 -40 120]];

	B = A.*W;	
	weight = color * sum(B(:));	
		
	% mobility

	% potential mobility

    % corner
    
    % stable boarder
    
%Mobilit�t, also die Differenz der Zugm�glichkeiten beider Spieler, und 
%potentielle Mobilit�t, also die Differenz von an gegnerische Steine 
%angrenzenden Feldern, sind die beiden wichtigsten Merkmale


end

